SJS: A Type System for JavaScript with Fixed Object Layout

نویسندگان

  • Wontae Choi
  • Satish Chandra
  • George C. Necula
  • Koushik Sen
چکیده

We propose a static type system for a significant subset of JavaScript, dubbed SJS, with the goal of ensuring that objects have a statically known layout at the allocation time, which in turn can enable an ahead-of-time (AOT) compiler to generate efficient code. The main technical challenge we address is to ensure fixed object layout, while supporting popular language features such as objects with prototype inheritance, structural subtyping, and method updates, with the additional constraint that SJS programs can run on any available standard JavaScript engine, with no deviation from JavaScript’s standard operational semantics. The core difficulty arises from the way standard JavaScript semantics implements object attribute update with prototypebased inheritance. To our knowledge, combining a fixed object layout property with prototype inheritance and subtyping has not been achieved previously.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Fixed point of generalized contractive maps on S^{JS}- metric spaces with two metrics

In this paper we prove existence of fixed point theorems for Z-contractive map, Geraghty type contractive map and interpolative Hardy-Rogers type contractive mapping in the setting of SJS- metric spaces with two metrics. Examples are constructed to high light the significance of newly obtained results.

متن کامل

Trace Typing: An Approach for Evaluating Retrofitted Type Systems

Recent years have seen growing interest in the retrofitting of type systems onto dynamically-typed programming languages, in order to improve type safety, programmer productivity, orperformance. In such cases, type system developers must strike a delicate balance betweendisallowing certain coding patterns to keep the type system simple, or including them at theexpense of additio...

متن کامل

Trace Typing: An Approach for Evaluating Retrofitted Type Systems (Extended Version)

Recent years have seen growing interest in the retrofitting of type systems onto dynamicallytyped programming languages, in order to improve type safety, programmer productivity, or performance. In such cases, type system developers must strike a delicate balance between disallowing certain coding patterns to keep the type system simple, or including them at the expense of additional complexity...

متن کامل

A Hybrid Meta-heuristic for the Dynamic Layout Problem with Transportation System Design

This paper primarily presents a comprehensive dynamic layout design model which integrates layout and transportation system design via considering more realistic assumptions, such as taking account of fixed-position departments and distance between departments that endanger each other. In addition, specific criteria such as capacity, cost and reliability of facilities are considered in transpor...

متن کامل

Uncovering JavaScript Performance Code Smells Relevant to Type Mutations

In dynamic typing languages such as JavaScript, object types can be mutated easily such as by adding a field to an object. However, compiler optimizations rely on a fixed set of types, unintentional type mutations can invalidate the speculative code generated by the type-feedback JIT and deteriorate the quality of compiler optimizations. Since type mutations are invisible, finding and understan...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015